package com.kingyun.gpsinspection.purificationservice.facade.service.jsm.version;

import com.alibaba.fastjson.JSONObject;
import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.EmployeeVo;
import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.Version;

import java.util.List;

/**
 * Created by huangxueqian on 2017/2/13/013.
 * 根据新增的版本进行版本新增
 */
public interface JsmVersionService {

    /**
     * 版本新增
     * @return
     * @throws Exception
     */
    public Version addVersion(Version version, EmployeeVo employee) throws Exception ;

    /**
     *
     * @return 版本逻辑删除
     * @throws Exception
     */
    public Integer delVersion(Version version) throws  Exception ;

    /**
     * 查询版本
     * @param version
     * @return
     */
    public Version queryVersion(Version version);

    /**
     * 查询最大版本{最近的版本}
     * @param relatedId
     * @return
     */
    public Version queryMaxVersion(String relatedId);

    /**
     * 根据关联的ID ， 查询当前使用的所有版本信息
     * @return
     */
    public List<Version> queryVersionList(String relatedId);

    /**
     * @param  version
     * @return 加载
     * @throws Exception
     */
    public JSONObject table(Version version) throws Exception ;

    /**
     * 版本新增
     * @param version
     * @return
     */
    public Integer addVersion(Version version, boolean isWorkCell, EmployeeVo employee) throws Exception;

}
